package com.dragon.controller;

import com.dragon.common.vo.PageBean;
import com.dragon.service.intf.UserService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/api/user/")
public class UserController {

    private final UserService userService;

    public UserController(UserService userService) {
        this.userService = userService;
    }

    @RequestMapping("all.do")
    @ResponseBody
    public PageBean getUser(int page, int limit){
        return userService.queryAll(page, limit);
    }
}
